The present invention relates to a computer system and an automatic starting method thereof, and more particularly to a computer system with the alarm power-on function of an RTC (Teal Time Clock) device and an automatic starting method thereof.
In recent years, a personal computer with an alarm power-on function (an automatic starting function) has been developed. The alarm power-on function is the function of turning on the power supply of the system at a predetermined time without the user turning on the power switch.
Use of the alarm power-on function enables the system to be turned on at a given time without human intervention. For example, when a personal computer is used as a server for a LAN in an office, the server can be started up automatically at the starting time of office hours in the next morning and work can be started again from where the work was stopped the preceding day. Such a function is known as an alarm power-on function.
The alarm power-on function is usually realized by making use of an alarm (an alarm interrupt request) from the RTC device in the system. Specifically, in the RTC device, "hours, minutes" (alarm time) or "month, day-of-month, hours, minutes" (alarm time and alarm date) specified by the user are stored as alarm setting information. At the time determined by the alarm setting information, the RTC device gives an alarm. Then, on the basis of the alarm, the automatic starting process is started in the system.
With a conventional method, when the system is turned on after the alarm setting information has been set in the RTC device, the alarm setting information is invalidated, regardless of whether the turning on of the system was triggered by the user operating the power switch or by the alarm power-on function. This invalidates the alarm power-on function. The reason for this is as follows.
If the alarm power-on function is not invalidated when the system is turned on, but is allowed to remain valid, there is a probability that the computer will be automatically started unexpectedly contrary to the user's expectation.
Specifically, when the user has specified only "hours, minutes" (automatic starting time), because "year, month, day-of-month" have not been set, the system will be turned on at the set time on a holiday that the user does not expect, although the user wants to start the system automatically at the set time on weekdays, for example. When the user has specified "month, day-of-month, hours, minutes" (automatic starting date), because "year" has not been set, there is a possibility that the system will be turned on at the setting date in the next year that the user does not expect, although the user wants to turn on the system automatically at the setting date only this year.
For this reason, with the conventional method, the alarm setting information is invalidated each time the system is turned on.
With this method, however, when the user turns on the system before the set time for some reason, the system will not be turned on automatically at the time that the user has set, even when the system is turned off before the set time has been reached, because the alarm power-on function is invalidated. When the system needs to be turned on automatically at a specific time every day or on specific days of the week, for example, the user has to set the time for every day or for each of the specific days of the week, resulting in a lot of time and labor.